<div class="lter nav-user hidden-xs pos-rlt" style="background-color:#e45748">            
	<div class="nav-avatar pos-rlt">
		<a href="#" class="thumb-sm avatar animated rollIn" data-toggle="dropdown">
			<img src="<?php echo base_url()?>images/avatar_default.png" alt="" class="" title="Hi, <?php echo strtoupper($this->session->userdata('user_name'));?> !">
			<span class="caret caret-white"></span>
		</a>
		<center>
			<?php echo $this->session->userdata('user_name');?>
		</center>
	</div>
</div>

<nav class="nav-primary hidden-xs">
	<ul class="nav">	
		<?php if($this->session->userdata('role')==1){ ?>
			<li class="dropdown-submenu">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
					<!--<b class="badge badge-white count-n pull-right">2</b>-->
					<i class="fa fa-archive"></i>
					<span>Legalisir</span>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="<?php echo site_url('admin/adlegalisir/permohonan');?>">Data Permohonan Legalisir</a>
					</li>
					<li>
						<a href="<?php echo site_url('admin/adlegalisir/persetujuan');?>">Data Persetujuan Legalisir</a>
					</li>
					<li>
						<a href="<?php echo site_url('admin/adlegalisir/pencarian');?>">Pencarian Data Legalisir</a>
					</li>
					<li>
						<a href="<?php echo site_url('admin/adlegalisir/ubah_status');?>">Ubah Status Berkas Legalisir</a>
					</li>
				</ul>
			</li>
			<li>
				<a href="<?php echo site_url('admin/aduserm/userM');?>">
					<i class="fa fa-users"></i>
					<span>User Management</span>
				</a>
			</li>
			<li>
				<a href="<?php echo site_url('admin/datasekolah');?>">
					<i class="fa fa-book"></i>
					<span>Data Sekolah</span>
				</a>
			</li>
		<?php }else if($this->session->userdata('role')==6 || $this->session->userdata('role')==7){?>
			<li class="dropdown-submenu">
				<a href="<?php echo site_url('admin/adlegalisir/permohonan');?>">
					<!--<b class="badge badge-white count-n pull-right">2</b>-->
					<i class="fa fa-archive"></i>
					<span>Data Permohonan Legalisir</span>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="javascript:j_permohonan(1)">Data Permohonan Baru</a>
					</li>
					<li>
						<a href="javascript:j_permohonan(2)">Data Permohonan Lama</a>
					</li>
					<li>
						<a href="<?php echo site_url('admin/adlegalisir/permohonan');?>">Data Permohonan Legalisir Semua</a>
					</li>
				</ul>
			</li>
		<?php }else if($this->session->userdata('role')==3){?>
			<li class="dropdown-submenu">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
				<!--<a href="<?php echo site_url('admin/adlegalisir/persetujuan');?>">-->
					<i class="fa fa-archive"></i>
					<span>Data Persetujuan Legalisir</span>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="<?php echo site_url('admin/adlegalisir/persetujuan');?>">Daftar Legalisir Belum Dicetak</a>
						<a href="<?php echo site_url('admin/adlegalisir/persetujuan/selesai');?>">Daftar Legalisir Sudah Dicetak</a>
					</li>
				</ul>
			</li>
		<?php }else{?>
		
			<?php if($this->session->userdata('role')==5){?>
			<?php
				foreach($show as $row)
				{
					$tmpt_lahir = $row->TEMPAT_LAHIR;
					$nama = $row->NAMA_LENGKAP;
				}
			?>
				<li>
					<?php if($tmpt_lahir == NULL){?>
						<a href="javascript:lengkapi_data()">
							<i class="fa fa-file-text-o"></i>
							<span>Permohonan Legalisir
							</span>
						</a>
					<?php }else{?>
						<a href="<?php echo site_url('pengajuan/index');?>">
							<i class="fa fa-file-text-o"></i>
							<span>Permohonan Legalisir
							</span>
						</a>
					<?php }?>
					</li>
				</li>
			
			<?php }else if($this->session->userdata('role')==4){?>
				<li>
					<a href="<?php echo site_url('admin/adlegalisir/persetujuan');?>">
						<i class="fa fa-file-text-o"></i>
						<span>Permohonan Legalisir</span>
					</a>
				</li>
			<?php }elseif($this->session->userdata('role')==2){?>
				<li>
					<a href="<?php echo site_url('admin/adlegalisir/permohonan');?>">
						<i class="fa fa-file-text-o"></i>
						<span>Permohonan Legalisir</span>
					</a>
				</li>
			<?php }else{?>
				<li>
					<a href="<?php echo site_url('pengajuan/index');?>">
						<i class="fa fa-file-text-o"></i>
						<span>Permohonan Legalisir</span>
					</a>
				</li>
			<?php }?>
		<?php }?>	
		<li>
			<a href="<?php echo site_url('setting/ubahPass');?>">
				<i class="fa fa-gears"></i>
				<span>Ubah Password</span>
			</a>
		</li>
	</ul>
</nav>
<script>
function j_permohonan(id){
	document.location = "<?php echo site_url('admin/adlegalisir/j_permohonan');?>/"+id;
}
function lengkapi_data(){
	alert("Lengkapi data-data terlebih dahulu !");
}
</script>